#include <bits/stdc++.h>

using namespace std;
using ll = long long;

void solve() {
	ll x, y, p1, p2;
	cin >> x >> y >> p1 >> p2;;
	if (x > y) {
		cout << "A" << endl;
	} else if (y > x) {
		cout << "B" << endl;
	} else if (p1 > p2) {
		cout << "A" << endl;
	} else {
		cout << "B" << endl;
	}
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	solve();
	return 0;
}